<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" 
   xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" 
   xmlns:ui="http://java.sun.com/jsf/facelets" 
   xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich" 
   xmlns:my="http://java.sun.com/jsf/composite/components">
	<h:form>
		<h:panelGrid columns="2">
			<h:outputLabel for="listadeformato" value="Formatos:" />
			<h:selectOneMenu id="listadeformato" value="#{codigoRegistration.codigoFormato}" style=" width : 235px;">
				<f:selectItems value="#{formato2Value}" />
			</h:selectOneMenu>

			<h:outputLabel for="codigoModelo" value="Modelo:" />
			<h:inputTextarea id="codigoModelo" value="#{codigoRegistration.linhasDeCodigo}" rows="28" cols="100" />
		</h:panelGrid>

		<h:panelGrid columns="5" columnClasses="titleCell">
			<h:outputLabel for="listadecodigo" value="Modelos:" />
			<h:selectOneMenu id="listadecodigo" value="#{codigoRegistration.idModelo2Buscar}" style=" width : 235px;">
				<f:selectItems value="#{modelo2Value}" />
			</h:selectOneMenu>

			<h:commandButton action="#{codigoRegistration.geraListaCodigoMedelo}" value="Obtem código modelo" />

			<h:commandButton action="#{codigoRegistration.geraCodigo}" value="Gera código Objeto negócio">
				<f:setPropertyActionListener target="#{codigoRegistration.idModelo}" value="#{codigoRegistration.idModelo2Buscar}"/>
			</h:commandButton>
		</h:panelGrid>
		<h:messages styleClass="messages" errorClass="invalid" infoClass="valid" warnClass="warning" globalOnly="true" />

		<div id="newCodigoMessages" class="update" />
	</h:form>
</ui:composition>
